<!--  -->
<template>
  <div class="userInfo">
    <el-descriptions title="用户信息">
      <el-descriptions-item label="用户名">{{
        userInfo.name
      }}</el-descriptions-item>
      <el-descriptions-item label="手机号">{{
        userInfo.cellphone
      }}</el-descriptions-item>
      <el-descriptions-item label="角色">
        <el-tag size="small">{{ userInfo.role.name }}</el-tag>
      </el-descriptions-item>
      <el-descriptions-item label="创建时间">{{
        userInfo.role.createdateAt
      }}</el-descriptions-item>
      <el-descriptions-item label="更新时间">{{
        userInfo.role.updateAt
      }}</el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script>
import { computed, defineComponent } from 'vue'
import { Dayjs } from 'dayjs'
import { useStore } from 'vuex'
export default defineComponent({
  setup() {
    const store = useStore()
    const userInfo = computed(() => store.state.login.userInfo)
    return { userInfo }
  }
})
</script>
<style lang="less" scoped>
.userInfo {
  padding: 20px;
}
</style>
